import Qt 4.7
import QtWebKit 1.0

Rectangle {
    id: main
    width: 1280;height: 768;focus: true
    KeyNavigation.right:movieFocus


    Image {
        id: bg
        anchors.fill:parent
        source: "res/home1.png"

        ItemFocus {
            id: movieFocus;x: 202;y: 254
            KeyNavigation.left:gameFocus;KeyNavigation.right:photoFocus
            onStartPage:{
                main.state = "showMovieWin"
            }
        }

        ItemFocus {
            id: photoFocus;x: 370;y: 256
            KeyNavigation.left:movieFocus;KeyNavigation.right:readerFocus
        }

        ItemFocus {
            id: readerFocus;x: 547;y: 254
            KeyNavigation.left:photoFocus;KeyNavigation.right:phoneFocus
        }

        ItemFocus {
            id: phoneFocus;x: 737;y: 254
            KeyNavigation.left:readerFocus;KeyNavigation.right:gameFocus
        }

        ItemFocus {
            id: gameFocus;x: 931;y: 254
            KeyNavigation.left:phoneFocus;KeyNavigation.right:movieFocus
        }

    }

    MovieWindow {id: moviewindow;anchors.fill:parent;opacity:0}

    states: [
        State {
            name: "showMovieWin"
            PropertyChanges {target: bg;opacity:0}
            PropertyChanges {target: moviewindow;opacity:1}
        }
    ]

    transitions: [
        Transition {
            NumberAnimation {properties:"opacity";duration: 500 }
        }
    ]

}
